CXX = g++
CXXFLAGS = -Wall -g
LD = g++
LDLIBS = -lpthread

OBJS = socket_utilities.o tokenizer.o process_data.o remote_party.o server_mode.o client_mode.o main.o 
EXEC = socket_engine


all: socket_engine

$(EXEC): $(OBJS)
	$(LD) -o $@ $(OBJS) $(LDLIBS)

%.o: %.cpp
	$(CXX) $< -c -o $@ $(CXXFLAGS) 

socket_utilities.o: msg_logger.h socket_utilities.h 

tokenizer.o: msg_logger.h tokenizer.h

process_data.o: tokenizer.h remote_party.h global_data.h

remote_party.o: remote_party.h

server_mode.o: server_mode.h

client_mode.o: client_mode.h msg_logger.h remote_party.h global_data.h

main.o: msg_logger.h tokenizer.h socket_utilities.h


clean:
	rm -rf $(OBJS) $(EXEC)